Fix/payment result nan#2314
Merged
Merged
Conversation
Contributor
dexcoder6
commented
May 9, 2026
- 修复支付成功页充值金额显示 NaN 。
- 修复管理端订单详情充值金额显示 NaN。
后端 ent 模型 PaymentOrder.FeeRate 带 omitempty,fee_rate=0 的订单 在 JSON 序列化时该字段会被剔除。前端 baseAmount 计算用 `fee_rate <= 0` 判断走分支,但 `undefined <= 0` 为 false,因此进入除法分支得到 NaN。 将 fee_rate 通过 Number(...) || 0 归一化,使缺失字段等价于 0。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
与支付成功页同源问题:fee_rate=0 时后端 omitempty 剔除字段,前端 `fee_rate <= 0` 判断对 undefined 失效,进入除法分支得到 NaN。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
All contributors have signed the CLA. ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.